import React from 'react';
import { useState } from 'react';
import { Drawer, Button } from '@arco-design/web-react';

function Drawers({ title, visible, changeState, content, width }) {
  return (
    <div>
      <Drawer
        footer={null}
        width={width ? width : 400}
        title={title}
        visible={visible}
        onOk={() => {
          changeState();
        }}
        onCancel={() => {
          changeState();
        }}
      >
        {content()}
      </Drawer>
    </div>
  );
}

export default Drawers;
